/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import model.personInfo.Contacts;
import model.personInfo.Name;
import model.personInfo.Origin;
import model.staff.Teacher;
import model.universityUnits.Lesson;

/**
 * Class that contains general constants.
 * @author Dmitri Paziy
 */
public class Constants {
    public static final String LINE_SEPARATOR = System.getProperty("line.separator");
    public static final String NULL_ARGUMENT_MESSAGE = "Null is inappropriate value.";
    public static final int MAXIMUM_COURSE = 6;
    public static final int MINIMAL_SALARY = 3000;
    public static final List<Teacher> teachers = new ArrayList<Teacher>();
    public static final List<Lesson> lessons = new ArrayList<Lesson>();
    
    static {
        initTeachers();
        initLessons();
    }
    
    /**
     * Method, that creates several instances of Teacher class.
     */
    private static void initTeachers() {
        Name name;
        Origin origin;
        Contacts contacts;
        Calendar calendar = Calendar.getInstance();
        
        calendar.set(1950, 5, 5);
        name = new Name("Yuriy", "Bohonov");
        origin = new Origin(calendar.getTime(), "Kiev");
        contacts = new Contacts("123456000", "Kiev, Street Pizza");
        teachers.add(new Teacher(name, origin, contacts));
        
        calendar.set(1978, 1, 1);
        name = new Name("Pavel", "Prepodavatelevich");
        origin = new Origin(calendar.getTime(), "Donetsk");
        contacts = new Contacts("111225421", "Kiev, New Street");
        teachers.add(new Teacher(name, origin, contacts));
        
        calendar.set(1980, 12, 12);
        name = new Name("Ivan", "Dobriy");
        origin = new Origin(calendar.getTime(), "Schastlivtsevo");
        contacts = new Contacts("555-11-51", "Kiev, Unknown");
        teachers.add(new Teacher(name, origin, contacts));
    }
    
    /**
     * Method, that creates several instanses of Lesson class.
     */
    private static void initLessons() {
        lessons.add(new Lesson(teachers.get(0), "Mathematics"));
        lessons.add(new Lesson(teachers.get(1), "Physics"));
        lessons.add(new Lesson(teachers.get(2), "Philosophy"));
    }
}
